args = inputbox("x y",args,"10 10")
dim fileroot,tempFile
dim doc
set doc = application.activedocument
fileroot =doc.path
tempFile = fileroot & "\tmp1.mcr"	
dim target
target = "s"
ocmd = target & args		
'create file
fileContent = "Application.ModelessCommand("""& target &""")" & chr(13) & chr(10)
fileContent = fileContent & "DlgModelessCmd.Command = " & chr(34) & ocmd & chr(34) & chr(13) & chr(10)
fileContent = fileContent & "DlgModelessCmd.OnOk()"		
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
set fw = fso.createtextfile(tempFile, True)
fw.write fileContent
fw.close
set fw = nothing
set fso = nothing
Application.RunMacro(tempFile)
'doc.ActiveView.SetExtentsToSelection 
doc.ActiveView.Pan args
dim ws : set ws = CreateObject("WScript.Shell")

dim varValue : varValue = ws.RegRead("HKEY_CURRENT_USER\Software\MyApp\PADS\ApplicationMode")
dim oval
oval = 0
'msgbox varValue
select case varValue
	case 0 'placement
		ws.RegWrite "HKEY_CURRENT_USER\Software\MyApp\PADS\SPACE",1, "REG_EXPAND_SZ"	
	case 1 'routemode
		ws.RegWrite "HKEY_CURRENT_USER\Software\MyApp\PADS\SPACE",2, "REG_EXPAND_SZ"
	case 2 'draw
		ws.RegWrite "HKEY_CURRENT_USER\Software\MyApp\PADS\SPACE",3, "REG_EXPAND_SZ"
	case else 'default 0
		ws.RegWrite "HKEY_CURRENT_USER\Software\MyApp\PADS\SPACE",0, "REG_EXPAND_SZ"
end select

set ws = nothing	